<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
<meta keywords='keywords check, adwords check, search engine result posiotion, serp , serposition , bojan babic projects'/>
<meta content="Bojan Babic tool check your Google SERP' name='description"/>
<meta name="google-site-verification" content="nF4zkCNL00T6jUwrIcGlefIb4xqVCrDKxpt4GO4halQ" />
<link type="text/css" rel="stylesheet"  href="stylesheets/style.css" />
<title>Quckly check your SERP</title>
<script type="text/javascript" src="scripts/json2.js">
</script>
<script type="text/javascript">
 // As mentioned at http://en.wikipedia.org/wiki/XMLHttpRequest
 //
    if( !window.XMLHttpRequest ) XMLHttpRequest = function()
    {
      try{ return new ActiveXObject("Msxml2.XMLHTTP.6.0") }catch(e){}
      try{ return new ActiveXObject("Msxml2.XMLHTTP.3.0") }catch(e){}
      try{ return new ActiveXObject("Msxml2.XMLHTTP") }catch(e){}
      try{ return new ActiveXObject("Microsoft.XMLHTTP") }catch(e){}
      throw new Error("Could not find an XMLHttpRequest alternative.")
    };

    //
    // Makes an AJAX request to a local server function w/ optional arguments
    //
    // functionName: the name of the server's AJAX function to call
    // opt_argv: an Array of arguments for the AJAX function
    //
    function Request(function_name, opt_argv) {

      if (!opt_argv)
      	opt_argv = new Array();
     
      // Find if the last arg is a callback function; save it
      var callback = null;
      var len = opt_argv.length;
      if (len > 0 && typeof opt_argv[len-1] == 'function') {
        callback = opt_argv[len-1];
        opt_argv.length--;
      }
      var async = (callback != null);
     
      // Encode the arguments in to a URI
      var query = 'action=' + encodeURIComponent(function_name);
      for (var i = 0; i < opt_argv.length; i++) {
        var key = 'arg' + i;
        var val = JSON.stringify(opt_argv[i]);
        query += '&' + key + '=' + encodeURIComponent(val);
      }
      query += '&time=' + new Date().getTime(); // IE cache workaround

      // Create an XMLHttpRequest 'GET' request w/ an optional callback handler 
      var req = new XMLHttpRequest();
      req.open('GET', '/rpc?' + query, async);
     
      if (async) {
        req.onreadystatechange = function() {
          if(req.readyState == 4 && req.status == 200) {
            var response = null;
            try {
             response = JSON.parse(req.responseText);
            } catch (e) {
             response = req.responseText;
            }
            callback(response);
          }
        }
      }
     
      // Make the actual request
      req.send(null);
    }
    // Adds a stub function that will pass the arguments to the AJAX call 
    function InstallFunction(obj, functionName) {
      obj[functionName] = function() { Request(functionName, arguments); }
    }
</script>
<script type="text/javascript">
    // Server object that will contain the callable methods
    var server = {};

    // Insert 'FindPositions' as the name of a callable method
    InstallFunction(server, 'matchTargetDomain');


    // Handy "macro"
    function $(id){
      return document.getElementById(id);
    }

    // Client function that calls a server rpc and provides a callback
    function doMatchTargetDomain() {
	$('result').innerHTML = "";
      server.matchTargetDomain($('keywords').value, $('domain').value, onSuccess);
    }

    // Callback for after a successful doAdd
    function onSuccess(response) {
      $('result').innerHTML= response;
    }

</script>
</head>
<h1><small>Check Google page rank with SERPosition</small></h1>
<body>
<div id="wrapper">
<div id="list1">
	<ul>
	<li><a href="http://bojanbabic.blogspot.com">Blog</a></li>
	<li><a href="http://www.linkedin.com/in/bojanbabic">About</a></li>
	<li><a href="http://twitter.com/bojanbabic">Contact</a></li>
	</ul>
</div>
<br>
<table>
	<tr><td></td></tr>
	<tr><td rowspan="2">
	<div id="list2">
		<ol>
			<li><p>First enter list of keywords or adwords you are bidding and for which you want to check your site's position Search Engine Result Page. Try out all keywords you are bidding for.</p></li>

			<li><p>Enter target domain/subomain. Domain/subdomain will be searched within 50 results of search in Google.</p></li><p>
		</ol>
	</div></td>
	<td><div id="inputDiv" ><input class="inputText" type="text" id="keywords" size="60"></div></p></td></tr>
	<tr><td>
		<div id="inputDivLower" ><input class="inputText" type="text" id="domain" size="40"></div><p><br></td>
	</tr>
	<tr><td colspan=2><input id="findButton" type="button" value="Find Positions" onClick="doMatchTargetDomain()" size="20"></td></tr>
	<tr><td colspan=2><div id="result" /></div></td></tr>

</table>
</div>
</body>
</html>
